package com.mdb.open.common.enums;
/*
 * Copyright (C), 2017-2019 澳发科技(MDB)
 * FileName: DataSource.java
 * Author:   符楚
 * Date:     2019-06-17 10:24
 * History:
 * <author>          <time>          <version>          <desc>
 * 符楚               2019-06-17          V1.00             新建
 * -----------------------------------------------------------
 * 作者姓名           修改时间           版本号            描述
 */

import com.mdb.bc.api.enums.ApiEnum;

/**
 * 数据渠道 (API: API , OPEN：开放平台、TELLER：柜员平台)<br>
 * <br>
 *
 * @author 符楚
 * @Date 2019-06-17 10:24
 */
public enum DataChannelEnum implements ApiEnum<String> {

    /**
     * api
     */
    API("API", "AP"),

    /**
     * open platform
     */
    OPEN("开放平台", "OP"),

    /**
     * teller platform
     */
    TELLER("柜员平台", "TP"),

    ;


    String text;

    /**
     * 渠道简称
     */
    String channelShort;

    DataChannelEnum(String text, String channelShort) {
        this.text = text;
        this.channelShort = channelShort;
    }

    public String getChannelShort() {
        return channelShort;
    }

    public static String getTextByName(DataChannelEnum dataChannelEnum){
        return dataChannelEnum.text;
    }

    @Override
    public String getValue() {
        return this.name();
    }

    @Override
    public String getText() {
        return this.text;
    }
}
